<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    <style type="text/css">
        ul li {
            list-style-type: none;
        }
    </style>
</head>
<body>
<h1>The Goods Page</h1>
<form action="doSaveObject" method="post">
    <ul>
        <li>name:
        <li><input name="name" type="text">
        <li>remark:
        <li><textarea cols="50" name="remark" rows="5"></textarea>
        <li><input type="submit" value="save">
    </ul>
</form>
<fieldset>
    <legend>商品列表</legend>
    <table width="50%">
        <thead>
        <th>id</th>
        <th>name</th>
        <th>remark</th>
        <th>createdTime</th>
        <th>operation</th>
        </thead>
        <tbody>
        <tr th:each="g:${list}">
            <td th:text="${g.id}">1</td>
            <td th:text="${g.name}">MySQL</td>
            <td th:text="${g.remark}">DBMS</td>
            <td th:text="${#dates.format(g.createdTime, 'yyyy/MM/dd HH:mm')}">2020/07/03</td>
            <td><a th:href="@{/goods/doDeleteById(id=${g.id})}">delete</a></td>
        </tr>
        </tbody>
    </table>
</fieldset>
</body>
</html>